package ch09;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

class _48_DateFormatEx2 {
	public static void main(String[] args) {
		Calendar cal = Calendar.getInstance();
		cal.set(2014, 9, 3);
		Date day = cal.getTime();

		SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
		System.out.println(sdf1.format(day)); // 2014-10-03	
	}
}